package StudyCode.summary.regularexpressionsmatch;

import java.text.Normalizer;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class RemovingAccentsAndDiacriticsFromGivenText {
	public static String removeAccents(String text) {
		if (text == null) {
			return null;
		}
		text = Normalizer.normalize(text, Normalizer.Form.NFD);
		return text.replaceAll("\\p{InCombiningDiacriticalMarks}+", "");
	}
}
